﻿using System;
using NHDao.Interfaces;
namespace NHDao
{
    public abstract  class DaoFactory
    {
        public static Type DAO_FACTORY = typeof (FrameworkDaoFactory);
        public static DaoFactory Instance(Type factory)
        {
            try
            {
                return (DaoFactory) Activator.CreateInstance(factory);
                
            }catch(Exception ex)
            {
                throw new Exception("No se crear Factory de DAO:"+factory);
            }
        }
        public abstract IRoleDAO GetRoleDAO();
        public abstract IUserDAO GetUserDAO();
        public abstract IUserRoleDAO GetUserRoleDAO();
    }
}

